﻿using UnityEngine;
using System.Collections;

public class movimiento : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}

	// Update is called once per frame
	void Update () {
		if(Input.GetKey(KeyCode.UpArrow)){
			gameObject.rigidbody.AddForce(new Vector3(0,0,200));
		}
		if (Input.GetKey (KeyCode.DownArrow)) {
			gameObject.rigidbody.AddForce(new Vector3(0,0,-200f));
		}
		if(Input.GetKey(KeyCode.RightArrow)){
			gameObject.rigidbody.AddForce(new Vector3(200f,0,0));
		}
		if(Input.GetKey(KeyCode.LeftArrow)){
			gameObject.rigidbody.AddForce(new Vector3(-200f,0,0));
		}
	}
}
